package com.etc.service;

import java.util.ArrayList;

import com.etc.dao.SkillDAO;
import com.etc.entity.Skill;

public class SkillService {

	SkillDAO skillDao = new SkillDAO();
	//添加一个技能
	public void addSkill() {
		Skill skill = new Skill("单刀直入", " 十步杀一人，千里不留行。对敌人造成120%伤害", 2, 120, "攻击技能",
				0, 0, 0, 0, 0, 0, 0, "d608832e");
		skillDao.addSkill(skill);
	}
	//根据技能id查找技能
	public void findSkillById() {
		Skill skill = skillDao.findSkillById("f786c5bc");
		System.out.println(skill.toString());
	}
	//根据职业id查找本职业所有的技能
	public ArrayList<Skill> findSkillByClassId(String classId) {
		ArrayList<Skill> skills = skillDao.findSkillByClass(classId);
		return skills;
	}
	
	//测试
	public static void main(String[] args) {
		SkillService skillSer = new SkillService();
		skillSer.addSkill();
//		skillSer.findSkillById();
//		ArrayList<Skill> skills = skillSer.findSkillByClassId("5a967488");
//		for (Skill skill : skills) {
//			System.out.println(skill);
//		}
	}
	
}
